//https://leetcode.cn/problems/invert-binary-tree/description/

/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     struct TreeNode *left;
 *     struct TreeNode *right;
 * };
 */

struct TreeNode* invertTree(struct TreeNode* root) {
    if (root == NULL)
    {
        return NULL;
    }

    struct TreeNode* lret = invertTree(root->left);
    struct TreeNode* rret = invertTree(root->right);
    root->left = rret;
    root->right = lret;

    return root;


}